package com.zsc.shixun.model.unauthorize;

import lombok.AllArgsConstructor;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * <p>
 * 用户注册VO
 * </p>
 *
 * @author ZWYZY
 * @since 2020/6/10
 */
@Data
@AllArgsConstructor
//@NoArgsConstructor
public class UserRegisterVO implements Serializable {
    private static final long serialVersionUID = 1L;
    @Email(message = "邮箱规则不对")
    public String email;//邮箱账号
    @Size(min = 0, max = 10, message = "用户名长度在0到10之内")
    @NotBlank(message = "邮箱不能为空")
    @NotNull(message = "必须填邮箱")
//    @Max(value =10 ,message = "用户名长度超出10")
//    @Min(value =5,message = "用户名长度不能少于5")
    public String username;//用户名
    @NotNull(message = "必须填密码")
    @NotBlank(message = "密码不能为空")
//    @Max(value = 5,message = "密码长度不能少于5")
    public String password;//密码
    @NotNull(message = "必须填角色id")
//    @NotBlank(message = "角色id不能为空")
    public Long roleId;//角色id
    @NotNull(message = "必须填验证码")
    @NotBlank(message = "验证码不能为空")
    public String code;//验证码

}
